package com.project.service.impl;

import com.project.bean.CutPageBean;
import com.project.bean.LinkBean;
import com.project.dao.ILinkDao;
import com.project.dao.impl.LinkDaoImpl;
import com.project.service.ILinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class LinkServiceImpl implements ILinkService {
    @Autowired
    private ILinkDao dao = new LinkDaoImpl();

    @Override
    public CutPageBean<LinkBean> cutAll(int pageNO) {
        return dao.cutAll(pageNO);
    }

    @Override
    public void delUser(int id) {
        dao.delUser(id);
    }

    @Override
    public void addUser(LinkBean linkBean) {
        dao.addUser(linkBean);
    }

    @Override
    public void update(int id, String phone) {
        dao.update(id, phone);
    }

    @Override
    public LinkBean findById(int id) {
        return dao.findById(id);
    }
}
